package com.ccntec.spark.core.tags.form.date;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.TagSupport;

import com.ccntec.spark.core.BasicTagSupport;

public class DateSimpleTag extends BasicTagSupport {
	
	private String name ;
	private String id ;
	
	@Override
	public int doStartTag() throws JspException {
		StringBuffer html = new StringBuffer();
		html.append("<div class=\"form-group\">\n");
		html.append("<input class=\"form-control datepicker\" name=\""+name+"\" id=\""+id+"\" type=\"text\" />");
		html.append("</div>\n</div>\n");
		outPrint(html);
		return EVAL_BODY_INCLUDE;
	}
	
	@Override
	public int doEndTag() throws JspException {
		return EVAL_PAGE;
	}
	
	@Override
	public void release() {
		// TODO Auto-generated method stub
		super.release();
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setId(String id) {
		this.id = id;
	}
}
